from django.urls import converters

class UserNameConverter:
    regex = "[a-zA-Z0-9]{5,20}"

    def to_python(self, value):
        return value

class MobileNumberConverter:
    regex = '1[3-9]\d{9}'

    def to_python(self, value):
        return str(value)